Optimal. Leaf size=167 \[ \frac{a \left (2 a^2-3 b^2\right ) \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )}{b^3 d \left (a^2-b^2\right )^{3/2}}-\frac{a \cos ^3(c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sin (c+d x))^2}-\frac{\cos (c+d x) \left (2 \left (a^2-b^2\right )+a b \sin (c+d x)\right )}{2 b^2 d \left (a^2-b^2\right ) (a+b \sin (c+d x))}-\frac{x}{b^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.27907, antiderivative size = 167, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {2864, 2863, 2735, 2660, 618, 204} \[ \frac{a \left (2 a^2-3 b^2\right ) \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )}{b^3 d \left (a^2-b^2\right )^{3/2}}-\frac{a \cos ^3(c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sin (c+d x))^2}-\frac{\cos (c+d x) \left (2 \left (a^2-b^2\right )+a b \sin (c+d x)\right )}{2 b^2 d \left (a^2-b^2\right ) (a+b \sin (c+d x))}-\frac{x}{b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2864
Rule 2863
Rule 2735
Rule 2660
Rule 618
Rule 204
Rubi steps
\begin{align*} \int \frac{\cos ^2(c+d x) \sin (c+d x)}{(a+b \sin (c+d x))^3} \, dx &=-\frac{a \cos ^3(c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}-\frac{\int \frac{\cos ^2(c+d x) (2 b+a \sin (c+d x))}{(a+b \sin (c+d x))^2} \, dx}{2 \left (a^2-b^2\right )}\\ &=-\frac{a \cos ^3(c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}-\frac{\cos (c+d x) \left (2 \left (a^2-b^2\right )+a b \sin (c+d x)\right )}{2 b^2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))}+\frac{\int \frac{-a b-2 \left (a^2-b^2\right ) \sin (c+d x)}{a+b \sin (c+d x)} \, dx}{2 b^2 \left (a^2-b^2\right )}\\ &=-\frac{x}{b^3}-\frac{a \cos ^3(c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}-\frac{\cos (c+d x) \left (2 \left (a^2-b^2\right )+a b \sin (c+d x)\right )}{2 b^2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))}+\frac{\left (a \left (2 a^2-3 b^2\right )\right ) \int \frac{1}{a+b \sin (c+d x)} \, dx}{2 b^3 \left (a^2-b^2\right )}\\ &=-\frac{x}{b^3}-\frac{a \cos ^3(c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}-\frac{\cos (c+d x) \left (2 \left (a^2-b^2\right )+a b \sin (c+d x)\right )}{2 b^2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))}+\frac{\left (a \left (2 a^2-3 b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+2 b x+a x^2} \, dx,x,\tan \left (\frac{1}{2} (c+d x)\right )\right )}{b^3 \left (a^2-b^2\right ) d}\\ &=-\frac{x}{b^3}-\frac{a \cos ^3(c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}-\frac{\cos (c+d x) \left (2 \left (a^2-b^2\right )+a b \sin (c+d x)\right )}{2 b^2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))}-\frac{\left (2 a \left (2 a^2-3 b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (a^2-b^2\right )-x^2} \, dx,x,2 b+2 a \tan \left (\frac{1}{2} (c+d x)\right )\right )}{b^3 \left (a^2-b^2\right ) d}\\ &=-\frac{x}{b^3}+\frac{a \left (2 a^2-3 b^2\right ) \tan ^{-1}\left (\frac{b+a \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2-b^2}}\right )}{b^3 \left (a^2-b^2\right )^{3/2} d}-\frac{a \cos ^3(c+d x)}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))^2}-\frac{\cos (c+d x) \left (2 \left (a^2-b^2\right )+a b \sin (c+d x)\right )}{2 b^2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))}\\ \end{align*}
Mathematica [A] time = 1.89661, size = 289, normalized size = 1.73 \[ \frac{\frac{\frac{2 a \left (-20 a^2 b^2+8 a^4+15 b^4\right ) \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )}{\left (a^2-b^2\right )^{5/2}}-\frac{3 b \left (-7 a^2 b^2+4 a^4+2 b^4\right ) \cos (c+d x)}{(a-b)^2 (a+b)^2 (a+b \sin (c+d x))}+\frac{a b \left (4 a^2-3 b^2\right ) \cos (c+d x)}{(a-b) (a+b) (a+b \sin (c+d x))^2}-8 (c+d x)}{b^3}-\frac{\frac{6 a b \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )}{\sqrt{a^2-b^2}}+\frac{\cos (c+d x) \left (b \left (a^2+2 b^2\right ) \sin (c+d x)+a \left (2 a^2+b^2\right )\right )}{(a+b \sin (c+d x))^2}}{(a-b)^2 (a+b)^2}}{8 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.132, size = 576, normalized size = 3.5 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.68554, size = 1702, normalized size = 10.19 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.28848, size = 346, normalized size = 2.07 \begin{align*} \frac{\frac{{\left (2 \, a^{3} - 3 \, a b^{2}\right )}{\left (\pi \left \lfloor \frac{d x + c}{2 \, \pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (a\right ) + \arctan \left (\frac{a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + b}{\sqrt{a^{2} - b^{2}}}\right )\right )}}{{\left (a^{2} b^{3} - b^{5}\right )} \sqrt{a^{2} - b^{2}}} - \frac{a^{3} b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 2 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 3 \, a^{2} b^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 2 \, b^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 7 \, a^{3} b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 4 \, a b^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 2 \, a^{4} - a^{2} b^{2}}{{\left (a^{3} b^{2} - a b^{4}\right )}{\left (a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 2 \, b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + a\right )}^{2}} - \frac{d x + c}{b^{3}}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]